<?php
/**
 * Created by PhpStorm.
 * User: xuke
 * Date: 16/6/12
 * Time: 下午2:47
 */

namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Services\ApiResult;

class ApiResultProvider extends  ServiceProvider
{
    public $defer = true;

    public function register()
    {
        return $this->app->singleton('ApiResult', function(){
            return new ApiResult();
        });
    }

    /**
     * 获取由提供者提供的服务.
     *
     * @return array
     */
    public function provides()
    {
        return ['ApiResult'];
    }

}